﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AdvertisementPostionManager.ascx.cs" Inherits="Web.Cms.Advertistment.AdvertisementPostionManager" %>
<table border="0" cellpadding="2" cellspacing="2" style="width: 100%">
    <tr>
        <td align="left">
            <a style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('/cms/Advertistment/AddEditAdvPostion.aspx','Quản lý nhóm vị trí banner',500,300,null,null)">
                <img src="../App_Themes/Default/Images/Add_b.gif" border="0" />
             </a>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <asp:Label ID="lblUpdateStatus" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td valign="top" colspan="2">
            <asp:GridView ID="grdAdvertisements" runat="server" AutoGenerateColumns="False" BorderColor="Gainsboro"
                BorderStyle="solid" BorderWidth="1px" CaptionAlign="Top" CellPadding="2" SkinID="AdminGrid"
                OnRowCommand="grdAdvertisements_RowCommand" OnRowDataBound="grdAdvertisements_RowDataBound"
                Width="100%" OnPageIndexChanging="grdAdvertisements_PageIndexChanging" PageSize="100">
                <AlternatingRowStyle CssClass="Grid_Raw2" />
                <RowStyle CssClass="Grid_Raw1" />
                <HeaderStyle CssClass="Grid_Top" Font-Bold="True" />
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            STT</HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblSTT" runat="server"></asp:Label>
                            <asp:Label Visible="false" ID="lblAdvId" runat="server" Text='<%# Eval("PositionID") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="10px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="AdvertisementID" Visible="False" />
                    <asp:BoundField DataField="Title" HeaderText="Nh&#243;m quảng c&#225;o" ItemStyle-Width="150px" />
                    <asp:BoundField DataField="Description" HeaderText="M&#244; tả" ItemStyle-Width="150px" />
                    <asp:TemplateField>
                        <HeaderTemplate>
                            Kích thước</HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblSize" runat="server"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="110px" />
                    </asp:TemplateField>                   
                    <asp:TemplateField>
                        <HeaderTemplate>
                            Người tạo</HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblCreatedBy" runat="server"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            Ngày tạo</HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblCreatedOn" runat="server"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="80px" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            Vị trí đặt
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblPosition" runat="server"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="100px" HorizontalAlign="center" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            chỉnh sửa
                        </HeaderTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="20px" />
                        <ItemTemplate>
                            <img alt="" src="../App_Themes/Default/images/edit.gif" style="cursor:pointer"
                            onclick="showPopWinADMIN('/cms/Advertistment/AddEditAdvPostion.aspx?ctrlkey=<%=CurrentCommand.CtrlKey %>&PositionID=<%# Eval("PositionID") %>','<%# Eval("Title") %>',500,300,null,null);return true;" />
                        </ItemTemplate>
                    </asp:TemplateField>                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                            Xóa</HeaderTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:Button ID="btnDeleteAdvertise" runat="server" CommandArgument='<%# Eval("PositionID") %>'
                                ToolTip="Xóa nhóm" CommandName="deleteadvertise" SkinID="IconDelete" Width="60px" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="20px" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
    </tr>
</table>